Bsure to check out the Tree Editor *BEFORE* you create any Trees.

So the first thing to do is fire it up, go to the Tree Editor, go to the "Branch to Node" Combobox and scroll down a few entries in the "Branch to Node" Combobox.

==================================================================

This is a Tool I built to create random events in a game I'm writing.

The idea is to create a Tree having Random-Depth Branches.

Each Branch can branch off into different directions so that when an Event happens it can go multiple ways.

The "real" way to do this is to probably just create branches as you need them but I wanted something to kind of push me along.

Hopefully what I end up with content-wise isn't too contrived just to force-fill the Nodes.

It's a one-and-done kind of tool. Once the Tree is created that's it for that game. You never use it again.

Unless you want to create multiple databases or put multiple tables in the same database and each time you run the Tree Creator you have it fill a different table. You'll have to change the Table Name in the code every time you do this.

You could pretty easily add another textbox to the Tree Creator and have it create an empty copy of the Table with whatever name you enter into the textbox and then have the Tree fill that new table. I should have done that and probably will.

That would allow you to use the same game engine (you gotta write that) but have multiple versions of it: Steampunk, Cyberpunk, Post-Apocalypse, etc.

Every time you create a New Tree it wipes out the existing Tree. All of it.

There are Sample Entries filled in this so you can see how it works.

If there's an entry missing in the middle of a Branch it will tell you. In fact, it will tell you all missing Nodes.

If you see something like:

"You walk into the forest."
"You see a bear."
"[Content is Missing]"
"YOU DIED!"

Then there's a missing bit that needs to be fixed.

I will caution you against putting in huge numbers for the Tree Creator.

I put in 999 for Starting Seed and 99 for Target Depth. Hours later it was in the 300's. Eventually it overflowed the 2 Gb limit on an Access Db.

Because it's Random, you might end up with the largest tree possible for the numbers input or something very small.

So you might have to do it a few times to get something you like which is exactly what I wanted.

I just roll until I get about the right balance between number of Branches and total number of Nodes.

I was looking for Nodes in the 3K to 5K range. Starting Seed of 75 with a Target Depth of 6 got me what I wanted after a couple rolls.

==================================================================

About the game and why I'm doing it this way. And before I go there, this IS NOT the game. This is to create content for the game in case that wasn't clear.

This game isn't a "story". It picks Events at random and the player responds to them.

So one event might have the player in her office and the next Event might be the player in a dungeon with no coherant path from office to dungeon.

That's not driven by the Tree though. If you were to use this to build a game you could easily set it up so it doesn't pick events at random and events have to follow each other in a logical way.

I'm just having fun.